/*
 *  method_info.h
 *
 *  Copyright (C) 2011  Jason<linux8192@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _METHOD_INFO_H_
#define _METHOD_INFO_H_


#include "type.h"
#include "attribute_info.h"


/*
 * Method info access flags
 */
#define METHOD_INFO_ACC_PUBLIC			0x0001
#define METHOD_INFO_ACC_PRIVATE			0x0002
#define METHOD_INFO_ACC_PROTECTED		0x0004
#define METHOD_INFO_ACC_STATIC			0x0008
#define METHOD_INFO_ACC_FINAL			0x0010
#define METHOD_INFO_ACC_SYNCHRONIZED		0x0020
#define METHOD_INFO_ACC_NATIVE			0x0100
#define METHOD_INFO_ACC_ABSTRACT		0x0400
#define METHOD_INFO_ACC_STRICT			0x0800


typedef struct _method_info {
	u2	access_flags;
	u2	name_index;
	u2	descriptor_index;

	u2	attributes_count;
	attr_t	attributes;
} method_info_t;


#endif /* _METHOD_INFO_H_ */
